function display_right(Content) {
    let subTarget = document.getElementById(Content);
    let leftContent = document.querySelectorAll(".leftContent")
    for (let i = 0; i < leftContent.length; i++) {
        leftContent[i].style.display = 'none';

    }
    if (subTarget.style['display'] == "none") {
        subTarget.style.display = "block";
    } else {
        subTarget.style.display = "none";
    }

}

function showContent1(a, b) {
    let r = document.querySelectorAll("." + b);
    let leftCon = document.querySelectorAll(".leftContent");
    let addSubCase = document.getElementById("addContent");
    addSubCase.style['display'] = 'none';
    for (let q = 0; q < leftCon.length; q++) {
        leftCon[q].style.display = 'none';
    }
    for (let m = 0; m < r.length; m++) {
        if (Number(a) - 1 == m) {
            r[m].style.display = "block";
        } else {
            r[m].style.display = "none";
        }
    }


}

//点击左侧导航栏 只改变右侧内容
/*var sub_ones=document.querySelector('#subOne');
var lis1=sub_ones.querySelectorAll('li');
var items1 = document.querySelectorAll('.itemOne');
for (var i = 0; i < lis1.length; i++){
    lis1[i].setAttribute('index1',i);
    lis1[i].onclick = function(){
        //
        let l = document.getElementById("addContent");
        l.style['display'] = 'none';
        //
        var index1 = this.getAttribute('index1');
        for(var i = 0; i < items1.length; i++){
            items1[i].style.display = 'none';
        }
        for(var i = 0; i < items3.length; i++){
            items3[i].style.display = 'none';
        }
        for(var i = 0; i < items2.length; i++){
            items2[i].style.display = 'none';
        }
        items1[index1].style.display = 'block';
    }
}
var sub_twos=document.querySelector('#subTwo');
var lis2=sub_twos.querySelectorAll('li');
var items2 = document.querySelectorAll('.itemTwo');
for (var i = 0; i < lis2.length; i++){
    lis2[i].setAttribute('index2',i);
    lis2[i].onclick = function(){
        let l = document.getElementById("addContent");
        l.style['display'] = 'none';
        var index2 = this.getAttribute('index2');
        for(var i = 0; i < items2.length; i++){
            items2[i].style.display = 'none';
        }
        for(var i = 0; i < items3.length; i++){
            items3[i].style.display = 'none';
        }
        for(var i = 0; i < items1.length; i++){
            items1[i].style.display = 'none';
        }
        items2[index2].style.display = 'block';
    }
}
let sub_threes=document.querySelector('#subThree');
let lis3=sub_threes.querySelectorAll('li');
let items3 = document.querySelectorAll('.itemThree');
for (let i = 0; i < lis3.length; i++){
    lis3[i].setAttribute('index3',i);
    lis3[i].onclick = function(){
        let l = document.getElementById("addContent");
        l.style['display'] = 'none';
        var index3 = this.getAttribute('index3');
        for(var i = 0; i < items3.length; i++){
            items3[i].style.display = 'none';
        }
        for(var i = 0; i < items2.length; i++){
            items2[i].style.display = 'none';
        }
        for(var i = 0; i < items1.length; i++){
            items1[i].style.display = 'none';
        }
        items3[index3].style.display = 'block';
    }
}
*/

//鼠标移开内容消失
function leave() {
    let l = document.getElementById("addContent");
    l.style['display'] = 'none';

}

//点击删除子案例
function remove(i) {
    let r = confirm("确定删除吗？"+ i)
    if (r == true) {
        let remove = document.getElementById(i)
        remove.style.display = 'none';
    }
}


//点击编辑显示编辑框+提交按钮+重置按钮
/*
let ediOO = document.getElementById('editOO');
let itemOne = document.getElementById('itemOne');
function editOne() {
    itemOne.style.display = 'none';
}*/

function closeDiv(d) {
    let l = document.getElementById(d);
    l.style.display = 'none';

}

//添加一个子案例
function addSubcase() {
    

}